package websocket_controller

import (
	"server/internal/library/websocket"
)

var CLogin = &cLogin{}

type cLogin struct{}

func (c *cLogin) Ping(client *websocket.Client, req *websocket.WsRequest) {
	websocket.SendSuccess(client, req.Event, "ok")
}

func (c *cLogin) Logout(client *websocket.Client, req *websocket.WsRequest) {
	websocket.CloseClient(client)
}

func (c *cLogin) ForceClientLogout(client *websocket.Client, req *websocket.WsRequest) {
	websocket.ForceClientLogout(req.Data)
}
